import axios from "axios";
import { loginreq, req, reqGet,reqHttpGet } from "./axiosFun";

// 登录接口
export const login = params => {
  return loginreq("POST", "/login", params);
};
// 桩主登录接口
export const chargerOwnerLogin = params => {
  return loginreq("POST", "/chargerOwnerLogin", params);
};

// 首页接口
// 充电桩折线图
export const getAdminDateStationOrderList = params => {
  return reqGet("GET", "/getAdminDateStationOrderList", params);
};
// 查询今日充电订单列表
export const getAdminStationOrderList = params => {
  return reqGet("GET", "/getAdminStationOrderList", params);
};

// 用户管理
// 获取用户列表
export const getUserList = params => {
  return req("POST", "/getUserList", params);
};
// 获取用户下级列表
export const getUserSubList = params => {
  return req("POST", "/getUserSubList", params);
};
// 启用/禁用用户
export const updateUserStatus = params => {
  return req("POST", "/updateUserStatus", params);
};
// 修改用户余额、积分
export const upUserInfo = params => {
  return req("POST", "/upUserInfo", params);
};

// 合伙人管理
// 合伙人列表
// 查询合伙人列表
export const getChargerOwnerList = params => {
  return reqGet("GET", "/getChargerOwnerList", params);
};
// 更新合伙人状态
export const updateChargerOwnerStatus = params => {
  return reqGet("GET", "/updateChargerOwnerStatus", params);
};
// 合伙人申请列表
// 查询申请列表
export const getChargerApplyList = params => {
  return reqGet("GET", "/getChargerApplyList", params);
};
// 查询申请详情
export const getChargerApplyInfo = params => {
  return reqGet("GET", "/getChargerApplyInfo", params);
};
// 审核申请
export const aduitChargerApply = params => {
  return reqGet("GET", "/aduitChargerApply", params);
};
// 查询待审核合伙人总数
export const getWaitAduitChargerOwnerCount = params => {
  return reqGet("GET", "/getWaitAduitChargerOwnerCount", params);
};
// 添加合伙人
export const addPartner = params => {
  return reqGet("GET", "/addPartner", params);
};

// 充电桩管理
// 电桩管理
// 查询所有充电桩列表
export const getStationAdminList = params => {
  return reqGet("GET", "/getStationAdminList", params);
};
// 查询充电桩详情
export const getAdminStationInfo = params => {
  return reqGet("GET", "/getAdminStationInfo", params);
};
// 审核充电桩
export const aduitStation = params => {
  return reqGet("GET", "/aduitStation", params);
};
// 查询待审核充电桩总数
export const getWaitAduitStationCount = params => {
  return reqGet("GET", "/getWaitAduitStationCount", params);
};

// 充电桩价格类型管理
// 查询充电价格类型
export const getChargePriceTypeList = params => {
  return reqGet("GET", "/getChargePriceTypeList", params);
};
// 添加充电价格类型
export const addChargePriceType = params => {
  return req("POST", "/addChargePriceType", params);
};
// 删除充电价格类型
export const deleteChargePriceType = params => {
  return reqGet("GET", "/deleteChargePriceType", params);
};
// 修改充电价格类型
export const upChargePriceType = params => {
  return req("POST", "/upChargePriceType", params);
};

// 添加充电价格配置
// 批量添加充电价格配置
export const addBatchChargePrice = params => {
  return req("POST", "/addBatchChargePrice", params);
};
// 查询充电价格配置列表
export const getChargePriceList = params => {
  return reqGet("GET", "/getChargePriceList", params);
};
// 添加充电价格配置
export const addChargePrice = params => {
  return req("POST", "/addChargePrice", params);
};
// 删除充电价格配置
export const deleteChargePrice = params => {
  return reqGet("DELETE", "/deleteChargePrice", params);
};
// 修改充电价格配置
export const upChargePrice = params => {
  return req("POST", "/upChargePrice", params);
};

// 充电桩列表
// 添加充电桩 
export const addAdminStation = params => {
  return req("POST", "/addAdminStation", params);
};
// 删除充电桩
export const deAdminStation = params => {
  return reqGet("GET", "/deAdminStation", params);
};
// 修改充电桩
export const upAdminStation = params => {
  return req("POST", "/upAdminStation", params);
};
// 站点管理
// 查询所有站点列表
export const getAdminSiteList = params => {
  return reqGet("GET", "/getAdminSiteList", params);
};
// 查询站点详情
export const getAdminSiteInfo = params => {
  return reqGet("GET", "/getAdminSiteInfo", params);
};
// 审核站点
export const aduitSiteInfo = params => {
  return reqGet("GET", "/aduitSiteInfo", params);
};
// 查询待审核站点总数
export const getWaitAduitSiteCount = params => {
  return reqGet("GET", "/getWaitAduitSiteCount", params);
};
// 站点列表
// 添加站点
export const addAdminSite = params => {
  return req("POST", "/addAdminSite", params);
};
// 删除站点
export const deAdminSite = params => {
  return reqGet("GET", "/deAdminSite", params);
};
// 修改站点
export const upAdminSite = params => {
  return req("POST", "/upAdminSite", params);
};
// 端口管理
// 查询所有充电桩端口列表
export const getAdminStationPortList = params => {
  return reqGet("GET", "/getAdminStationPortList", params);
};
// 查询所有充电桩端口列表
export const getAdminStationPortListHttp = params => {
  return reqHttpGet("GET", "/getStationPortList", params);
};
// 查询充电桩端口详情
export const getAdminStationPortInfo = params => {
  return reqGet("GET", "/getAdminStationPortInfo", params);
};
// 充电桩订单管理
// 查询订单列表
export const getOrderList = params => {
  return reqGet("GET", "/getOrderList", params);
};
// 查询订单详情
export const getOrderInfo = params => {
  return reqGet("GET", "/getOrderInfo", params);
};
// 设置订单停车费
export const setOrderPark = params => {
  return reqGet("GET", "/setOrderPark", params);
};
// 满减管理(优惠券)
// 查询优惠券列表
export const getCouponsList = params => {
  return reqGet("GET", "/getCouponsList", params);
};
// 添加优惠券
export const addCoupons = params => {
  return req("POST", "/addCoupons", params);
};
// 修改优惠券
export const upCoupons = params => {
  return req("POST", "/upCoupons", params);
};
// 删除优惠券
export const deleteCoupons = params => {
  return reqGet("DELETE", "/deleteCoupons", params);
};
// 调整优惠券库存
export const alterCouponsCount = params => {
  return reqGet("GET", "/alterCouponsCount", params);
};
// 警告管理
// 查询警告列表
export const getWarnList = params => {
  return reqGet("GET", "/getWarnList", params);
};
// 添加警告
export const addWarn = params => {
  return req("POST", "/addWarn", params);
};
// 删除警告
export const deleteWarn = params => {
  return reqGet("DELETE", "/deleteWarn", params);
};
// 修改警告
export const upWarn = params => {
  return req("POST", "/upWarn", params);
};
// 查询待处理警告总数
export const getWaitWarnCount = params => {
  return reqGet("GET", "/getWaitWarnCount", params);
};

// 发票管理
// 查询所有发票申请
export const getAdminInvoiceList = params => {
  return reqGet("GET", "/getAdminInvoiceList", params);
};
// 查询发票详情
export const getAdminInvoiceInfo = params => {
  return reqGet("GET", "/getAdminInvoiceInfo", params);
};
// 审核发票申请
export const aduitInvoice = params => {
  return reqGet("GET", "/aduitInvoice", params);
};
// 查询待开票发票总数
export const getWaitInvoiceCount = params => {
  return reqGet("GET", "/getWaitInvoiceCount", params);
};

// 商品管理
// 商品分类列表
// 查询商品分类列表
export const getCommodityCategoryList = params => {
  return reqGet("GET", "/getCommodityCategoryList", params);
};
// 添加商品分类
export const addCommodityCategory = params => {
  return req("POST", "/addCommodityCategory", params);
};
// 删除商品分类
export const deleteCommodityCategory = params => {
  return reqGet("DELETE", "/deleteCommodityCategory", params);
};
// 修改商品分类
export const upCommodityCategory = params => {
  return req("POST", "/upCommodityCategory", params);
};
// 商品列表
// 查询商品列表
export const getCommodityList = params => {
  return reqGet("GET", "/getCommodityList", params);
};
// 查询商品详情
export const getCommodityInfo = params => {
  return reqGet("GET", "/getCommodityInfo", params);
};
// 调整商品库存
export const alterCommodityCount = params => {
  return reqGet("GET", "/alterCommodityCount", params);
};
// 添加商品
export const addCommodity = params => {
  return req("POST", "/addCommodity", params);
};
// 删除商品
export const deleteCommodity = params => {
  return reqGet("DELETE", "/deleteCommodity", params);
};
// 修改商品
export const upCommodity = params => {
  return req("POST", "/upCommodity", params);
};
// 商品订单管理
// 查询订单列表
export const getShopOrderList = params => {
  return reqGet("GET", "/getShopOrderList", params);
};
// 去发货
export const tryPost = params => {
  return req("POST", "/tryPost", params);
};
// 商品评论列表
// 查询商品评论列表
export const getAdminCommodityReplyList = params => {
  return reqGet("GET", "/getAdminCommodityReplyList", params);
};
// 回复商品评论
export const returnReply = params => {
  return req("POST", "/returnReply", params);
};
// 添加商品评论
export const addCommodityReply = params => {
  return req("POST", "/addCommodityReply", params);
};
// 删除商品评论
export const deleteAdminCommodityReply = params => {
  return reqGet("DELETE", "/deleteAdminCommodityReply", params);
};

// 财务管理
// 积分管理
// 查询所有用户积分明细列表 type 0 新增 1 扣除
export const getAllUserPointDetailList = params => {
  return reqGet("GET", "/getAllUserPointDetailList", params);
};
// 消费反积分百分比服务
// 获取消费反积分百分比
export const getPointPercent = params => {
  return reqGet("DELETE", "/getPointPercent", params);
};
// 添加消费反积分百分比
export const addPointPercent = params => {
  return req("POST", "/addPointPercent", params);
};
// 删除消费反积分百分比
export const deletePointPercent = params => {
  return reqGet("DELETE", "/deletePointPercent", params);
};
// 修改消费反积分百分比
export const upPointPercent = params => {
  return req("POST", "/upPointPercent", params);
};
// 钱包管理
// 查询所有用户钱包余额明细列表 type 0 新增 1 扣除
export const getAllUserBalanceList = params => {
  return reqGet("GET", "/getAllUserBalanceList", params);
};
// 提现管理
// 审核提现
export const aduitPayout = params => {
  return req("POST", "/aduitPayout", params);
};
// 提现记录管理列表
export const payoutsList = params => {
  return req("POST", "/payoutsList", params);
};
// 查询待审核提现记录总数
export const getWaitPayoutsCount = params => {
  return reqGet("GET", "/getWaitPayoutsCount", params);
};
// 提现税率设置
// 查询提现税率设置
export const getTax = params => {
  return reqGet("GET", "/getTax", params);
};
// 添加提现税率设置
export const addTax = params => {
  return req("POST", "/addTax", params);
};
// 删除提现税率设置
export const deleteTax = params => {
  return reqGet("DELETE", "/deleteTax", params);
};
// 修改提现税率设置
export const upTax = params => {
  return req("POST", "/upTax", params);
};

// 充值记录
// 查询充值记录列表
export const getBalanceList = params => {
  return req("POST", "/getBalanceList", params);
};
// 充值金额设置
// 查询充值金额设置列表
export const getRechargeList = params => {
  return reqGet("GET", "/getRechargeList", params);
};
// 查询充值金额设置详情
export const getRechargeInfo = params => {
  return reqGet("GET", "/getRechargeInfo", params);
};
// 添加充值金额设置
export const addRecharge = params => {
  return req("POST", "/addRecharge", params);
};
// 删除充值金额设置
export const deleteRecharge = params => {
  return reqGet("DELETE", "/deleteRecharge", params);
};
// 修改充值金额设置
export const upRecharge = params => {
  return req("POST", "/upRecharge", params);
};
// 获取使用规则
export const getDescription = params => {
  return reqGet("GET", "/getDescription", params);
};
// 设置使用规则
export const setDescription = params => {
  return req("POST", "/setDescription", params);
};
// 充值积分百分比服务
// 获取充值积分百分比
export const getPercent = params => {
  return reqGet("DELETE", "/getPercent", params);
};
// 添加充值积分百分比
export const addPercent = params => {
  return req("POST", "/addPercent", params);
};
// 删除充值积分百分比
export const deletePercent = params => {
  return reqGet("DELETE", "/deletePercent", params);
};
// 修改充值积分百分比
export const upPercent = params => {
  return req("POST", "/upPercent", params);
};

// 会员配置管理
// 会员配置列表
// 查询会员配置列表
export const getMemberList = params => {
  return reqGet("GET", "/getMemberList", params);
};
// 查询会员配置详情
export const getMemberInfo = params => {
  return reqGet("GET", "/getMemberInfo", params);
};
// 添加会员配置
export const addMember = params => {
  return req("POST", "/addMember", params);
};
// 删除会员配置
export const deleteMember = params => {
  return reqGet("DELETE", "/deleteMember", params);
};
// 修改会员配置
export const upMember = params => {
  return req("POST", "/upMember", params);
};
// 税金设置服务接口
// 查询税金设置
export const getTaxes = params => {
  return reqGet("GET", "/getTaxes", params);
};
// 添加税金设置
export const addTaxes = params => {
  return req("POST", "/addTaxes", params);
};
// 删除税金设置
export const deleteTaxes = params => {
  return reqGet("DELETE", "/deleteTaxes", params);
};
// 修改税金设置
export const upTaxes = params => {
  return req("POST", "/upTaxes", params);
};


// 设备管理
// 查询设备列表
export const getDeviceList = params => {
  return reqGet("GET", "/getDeviceList", params);
};
// 添加设备
export const addDevice = params => {
  return req("POST", "/addDevice", params);
};
// 删除设备
export const deleteDevice = params => {
  return reqGet("DELETE", "/deleteDevice", params);
};
// 修改设备
export const upDevice = params => {
  return req("POST", "/upDevice", params);
};

// 用户反馈
// 查询所有意见反馈
export const getFeedback = params => {
  return reqGet("GET", "/getFeedback", params);
};
// 更新意见反馈状态
export const upFeedbackStatus = params => {
  return reqGet("GET", "/upFeedbackStatus", params);
};
// 查询待处理用户反馈记录总数
export const getWaitFeedbackCount = params => {
  return reqGet("GET", "/getWaitFeedbackCount", params);
};

// 拉新配置管理
// 查询拉新配置列表
export const getPullNewList = params => {
  return reqGet("GET", "/getPullNewList", params);
};
// 添加拉新配置
export const addPullNew = params => {
  return req("POST", "/addPullNew", params);
};
// 删除拉新配置
export const deletePullNew = params => {
  return reqGet("DELETE", "/deletePullNew", params);
};
// 修改拉新配置
export const upPullNew = params => {
  return req("POST", "/upPullNew", params);
};

// 轮播图管理
// 查询轮播图
export const getCarouselList = params => {
  return reqGet("GET", "/getCarouselList", params);
};
// 添加轮播图
export const addCarousel = params => {
  return req("POST", "/addCarousel", params);
};
// 删除轮播图
export const deleteCarousel = params => {
  return req("POST", "/deleteCarousel", params);
};
// 修改轮播图
export const upCarousel = params => {
  return req("POST", "/upCarousel", params);
};

// 获取商城客服电话
export const getAdminMobile = params => {
  return req("POST", "/getAdminMobile", params);
};
// 设置商城客服电话
export const setAdminMobile = params => {
  return req("POST", "/setAdminMobile", params);
};

// 查询充电桩数据
export const getAdminStationData = params => {
  return reqGet("GET", "/getAdminStationData", params);
};
// 查询数据展示
export const getAdminData = params => {
  return reqGet("GET", "/getAdminData", params);
};

// 充电桩转让价格服务费设置接口
// 查询充电桩转让价格服务费列表
export const getTransferCost = params => {
  return reqGet("GET", "/getTransferCost", params);
};
// 添加充电桩转让价格服务费
export const addTransferCost = params => {
  return req("POST", "/addTransferCost", params);
};
// 删除充电桩转让价格服务费
export const deleteTransferCost = params => {
  return reqGet("DELETE", "/deleteTransferCost", params);
};
// 修改充电桩转让价格服务费
export const upTransferCost = params => {
  return req("POST", "/upTransferCost", params);
};

// 转让列表
// 查询转让中充电桩列表
export const getAdminTransferStationList = params => {
  return reqGet("GET", "/getAdminTransferStationList", params);
};
// 审核转让中充电桩列表
export const aduitTransferStation = params => {
  return reqGet("GET", "/aduitTransferStation", params);
};
// 查询待审核转让充电桩总数
export const getWaitAduitTransferStationCount = params => {
  return reqGet("GET", "/getWaitAduitTransferStationCount", params);
};
// 查询场地列表
export const getAdminVenuesList = params => {
  return reqGet("GET", "/getAdminVenuesList", params);
};
// 审核转让场地
export const aduitVenues = params => {
  return req("POST", "/aduitVenues", params);
};
// 查询待审核场地总数
export const getWaitAduitVenuesCount = params => {
  return req("POST", "/getWaitAduitVenuesCount", params);
};

// 管理员充电桩管理
// 端口列表
// 添加端口
export const addAdminStationPort = params => {
  return req("POST", "/addAdminStationPort", params);
};
// 删除端口
export const deAdminStationPort = params => {
  return reqGet("GET", "/deAdminStationPort", params);
};
// 修改端口
export const upAdminStationPort = params => {
  return req("POST", "/upAdminStationPort", params);
};


// 平台协议管理
// 查询平台协议列表
export const getAdminProtocolManagement = params => {
  return reqGet("GET", "/getAdminProtocolManagement", params);
};
// 添加平台协议
export const addAdminProtocolManagement = params => {
  return req("POST", "/addAdminProtocolManagement", params);
};
// 删除平台协议
export const deleteAdminProtocolManagement = params => {
  return reqGet("DELETE", "/deleteAdminProtocolManagement", params);
};
// 修改平台协议
export const upAdminProtocolManagement = params => {
  return req("POST", "/upAdminProtocolManagement", params);
};


// 余额充电金额终止条件配置
// 查询余额充电金额终止条件列表
export const getChargerEnd = params => {
  return reqGet("GET", "/getChargerEnd", params);
};
// 添加余额充电金额终止条件
export const addChargerEnd = params => {
  return req("POST", "/addChargerEnd", params);
};
// 删除余额充电金额终止条件
export const deleteChargerEnd = params => {
  return reqGet("DELETE", "/deleteChargerEnd", params);
};
// 修改余额充电金额终止条件
export const upChargerEnd = params => {
  return req("POST", "/upChargerEnd", params);
};

// 预约充电拥金管理 
// 查询预约充电押金列表
export const getOrderBookingDeposit = params => {
  return reqGet("GET", "/getOrderBookingDeposit", params);
};
// 添加预约充电押金
export const addOrderBookingDeposit = params => {
  return req("POST", "/addOrderBookingDeposit", params);
};
// 删除预约充电押金
export const delete0rderBookingDeposit = params => {
  return reqGet("DELETE", "/delete0rderBookingDeposit", params);
};
// 修改预约充电押金
export const upOrderBookingDeposit = params => {
  return req("POST", "/upOrderBookingDeposit", params);
};

// 排行榜管理
// 查询节能减排排行榜
export const getAdminLeaderboardList = params => {
  return req("POST", "/getAdminLeaderboardList", params);
};
// 查询明日之星排行榜
export const getAdminMemberList = params => {
  return req("POST", "/getAdminMemberList", params);
};
// 发放优惠券
export const sendCoupons = params => {
  return req("POST", "/sendCoupons", params);
};

// 管理角色管理
// 查询用户
export const getAdminList = params => {
  return req("POST", "/getAdminList", params);
};
// 添加用户
export const addAdmin = params => {
  return req("POST", "/addAdmin", params);
};
// 删除用户
export const deleteAdmin = params => {
  return req("POST", "/deleteAdmin", params);
};
// 修改用户
export const upAdmin = params => {
  return req("POST", "/upAdmin", params);
};
